package com.oa.demo;

import org.junit.Test;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

/**
 * @author 孔德成
 * @date 2020/11/27 15:00
 */
public class Password {

    @Test
    public void test(){

        String password ="123456";
        String bCryptPasswordEncoder = new BCryptPasswordEncoder().encode(password);
        String bCryptPasswordEncoder1 = new BCryptPasswordEncoder().encode(password);
        System.out.println(bCryptPasswordEncoder);
        System.out.println(new BCryptPasswordEncoder().matches(password,bCryptPasswordEncoder1));
    }
}
